package com.itheima.mapper;

import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper {

    /**
     * 根据预约id查询预约信息
     * @param id
     * @return
     */
    @Select("select * from t_order where id = #{id}")
    Order findById(String id);

    /**
     * 条件查询
     * @param order
     * @return
     */
    List<Order> findByCondition(Order order);

    /**
     * 新增订单
     * @param order
     */
    void add(Order order);
}
